package com.java.io;

public class Recursive {

	public static void main(String[] args){
		System.out.println(sum(100));
	}

	//从1加到end的和
	public static int sum(int end){
		if(end > 0){
			return end + sum(end-1);
		}else{
			return 0;
		}
	}

}
